{% extends 'machine/base.html' %}

{% block title %} Register {% endblock %}

{% block body_block %}
<div style="margin: 15% 15%">
    <h1>注册XKOJ的账户</h1>
    {% if registered %}
        您已经注册成功！
    {% else %}
    <form id="coder_form" method="post" action="/register/" enctype = "multipart/form-data">
        {% csrf_token %}
	<div class="field">
	    <label for="id_username">用户名：</label>
	    <div class="ui icon input left">
		    <input id="id_username" maxlength="30" name="username" type="text" />
            </div>
        </div>

	<div class="field">
	    <label for="id_password">密码：</label>
            <div class="ui icon input left">
                <input id="id_password" name="password" type="password" />
            </div>
        </div>

	<div class="field">
	    <label for="id_avatar">头像： </label>
	    <div class="ui icon input left">
		<input id="id_avatar" type="file" name="avatar">
	    </div>
        <div style="position: relative;top: 20px; left: 40px">
            <input type="submit" name="submit" value="确认注册" class="ui blue submit button" />

        </div>
    </form>
</div>        
{% endif %}
{% endblock %}
